import instance from "@/axios";

export const getWikiPageList = (data) => { 
    return instance({
        url: '/admin/wiki/list',
        method: 'POST',
        data
    })
}
export const addWiki = (data) => {
    return instance({
        url: '/admin/wiki/add',
        method: 'POST',
        data
    })
}

export const updateWikiIsTop = (data) => {
    return instance({
        url: '/admin/wiki/isTop/update',
        method: 'POST',
        data
    })
}
export const updateWikiIsPublish = (data) => {
    return instance({
        url: '/admin/wiki/isPublish/update',
        method: 'POST',
        data
    })
}
export const deleteWiki = (id) => {
    return instance({
        url: '/admin/wiki/delete',
        method: 'POST',
        data: { id }
    })
}

export const updateWiki = (data) => {
    return instance({
        url: '/admin/wiki/update',
        method: 'POST',
        data
    })
}

export const getWikiCatalogs = (id) => {
    return instance({
        url: '/admin/wiki/catalog/list',
        method: 'POST',
        data: { id }
    })
}

export const updateWikiCatalogs = (data) => {
    return instance({
        url: '/admin/wiki/catalog/update',
        method: 'POST',
        data
    })
}